<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>考勤系统 - 员工管理</title>
  <script src="https://cdn.tailwindcss.com"></script>
  <link href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet">
  <script src="https://cdn.jsdelivr.net/npm/chart.js@4.4.8/dist/chart.umd.min.js"></script>
  <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
  
  <script>
    tailwind.config = {
      theme: {
        extend: {
          colors: {
            primary: '#165DFF',
            secondary: '#4080FF',
            success: '#00B42A',
            warning: '#FF7D00',
            danger: '#F53F3F',
            info: '#86909C',
            light: '#F2F3F5',
            dark: '#1D2129',
          },
          fontFamily: {
            inter: ['Inter', 'sans-serif'],
          },
        },
      }
    }
  </script>
  
  <style type="text/tailwindcss">
    @layer utilities {
      .content-auto {
        content-visibility: auto;
      }
      .sidebar-item {
        @apply flex items-center gap-3 px-4 py-3 rounded-lg transition-all duration-200 hover:bg-primary/10;
      }
      .sidebar-item.active {
        @apply bg-primary/10 text-primary font-medium;
      }
      .card {
        @apply bg-white rounded-xl shadow-sm border border-gray-100 p-5 transition-all duration-300 hover:shadow-md;
      }
      .btn {
        @apply px-4 py-2 rounded-lg transition-all duration-200 font-medium;
      }
      .btn-primary {
        @apply bg-primary text-white hover:bg-primary/90 active:bg-primary/80;
      }
      .btn-outline {
        @apply border border-gray-200 hover:bg-gray-50 active:bg-gray-100;
      }
      .btn-success {
        @apply bg-success text-white hover:bg-success/90 active:bg-success/80;
      }
      .btn-danger {
        @apply bg-danger text-white hover:bg-danger/90 active:bg-danger/80;
      }
      .form-input {
        @apply w-full px-3 py-2 border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary/30 focus:border-primary transition-all duration-200;
      }
    }
  </style>
</head>

<body class="font-inter bg-gray-50 text-dark min-h-screen flex flex-col">
  <!-- 顶部导航栏 -->
  <header class="bg-white border-b border-gray-200 sticky top-0 z-50 shadow-sm">
    <div class="container mx-auto px-4">
      <div class="flex items-center justify-between h-16">
        <!-- Logo -->
        <div class="flex items-center">
          <div class="text-primary text-2xl font-bold mr-2">
            <i class="fa fa-calendar-check-o"></i>
          </div>
          <span class="text-xl font-bold">考勤系统</span>
        </div>
        
        <!-- 搜索框 -->
        <div class="hidden md:block flex-1 max-w-md mx-8">
          <div class="relative">
            <span class="absolute inset-y-0 left-0 flex items-center pl-3">
              <i class="fa fa-search text-gray-400"></i>
            </span>
            <input type="text" class="form-input pl-10" placeholder="搜索员工、部门或考勤记录...">
          </div>
        </div>
        
        <!-- 用户菜单 -->
        <div class="flex items-center gap-4">
          <button class="btn-outline rounded-full p-2 relative">
            <i class="fa fa-bell-o"></i>
            <span class="absolute top-1 right-1 bg-danger text-white text-xs rounded-full h-4 w-4 flex items-center justify-center">3</span>
          </button>
          
          <div class="relative group">
            <button class="flex items-center gap-2">
              <img src="https://picsum.photos/id/1005/40/40" alt="用户头像" class="h-8 w-8 rounded-full object-cover">
              <span class="hidden md:inline font-medium">管理员</span>
              <i class="fa fa-angle-down text-gray-400"></i>
            </button>
            
            <div class="absolute right-0 mt-2 w-48 bg-white rounded-lg shadow-lg border border-gray-100 opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-200 z-50">
              <div class="py-2">
                <a href="#" class="block px-4 py-2 hover:bg-gray-50">
                  <i class="fa fa-user-o mr-2"></i>个人资料
                </a>
                <a href="#" class="block px-4 py-2 hover:bg-gray-50">
                  <i class="fa fa-cog mr-2"></i>设置
                </a>
                <div class="border-t border-gray-100 my-1"></div>
                <a href="#" class="block px-4 py-2 hover:bg-gray-50 text-danger">
                  <i class="fa fa-sign-out mr-2"></i>退出登录
                </a>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </header>

  <div class="flex flex-1 overflow-hidden">
    <!-- 侧边栏 -->
    <aside class="w-64 bg-white border-r border-gray-200 flex-shrink-0 hidden md:block">
      <div class="py-6 px-2">
        <nav class="space-y-1">
          <a href="#" class="sidebar-item">
            <i class="fa fa-home"></i>
            <span>首页</span>
          </a>
          <a href="#" class="sidebar-item active">
            <i class="fa fa-user-o"></i>
            <span>员工管理</span>
          </a>
          <a href="#" class="sidebar-item">
            <i class="fa fa-calendar"></i>
            <span>考勤记录</span>
          </a>
          <a href="#" class="sidebar-item">
            <i class="fa fa-bar-chart"></i>
            <span>统计报表</span>
          </a>
          <a href="#" class="sidebar-item">
            <i class="fa fa-clock-o"></i>
            <span>排班管理</span>
          </a>
          <a href="#" class="sidebar-item">
            <i class="fa fa-paper-plane-o"></i>
            <span>请假申请</span>
          </a>
          <a href="#" class="sidebar-item">
            <i class="fa fa-cog"></i>
            <span>系统设置</span>
          </a>
        </nav>
      </div>
    </aside>

    <!-- 移动端菜单按钮 -->
    <button class="md:hidden fixed bottom-4 right-4 bg-primary text-white p-3 rounded-full shadow-lg z-40">
      <i class="fa fa-bars"></i>
    </button>

    <!-- 主内容区 -->
    <main class="flex-1 overflow-y-auto p-4 md:p-6">
      <div class="max-w-7xl mx-auto">
        <!-- 页面标题 -->
        <div class="mb-8">
          <h1 class="text-[clamp(1.5rem,3vw,2.5rem)] font-bold text-dark">员工管理</h1>
          <p class="text-gray-500 mt-1">管理和查看所有员工的信息和考勤情况</p>
        </div>

        <!-- 员工统计卡片 -->
        <div class="grid grid-cols-1 md:grid-cols-4 gap-6 mb-8">
          <div class="card">
            <div class="flex justify-between items-start">
              <div>
                <h3 class="text-gray-500 font-medium">总员工数</h3>
                <p class="text-3xl font-bold mt-1">128<span class="text-lg font-medium text-gray-500 ml-1">人</span></p>
                <div class="flex items-center mt-3 text-success text-sm">
                  <i class="fa fa-arrow-up mr-1"></i>
                  <span>8人 (较上月)</span>
                </div>
              </div>
              <div class="h-12 w-12 rounded-full bg-primary/10 flex items-center justify-center">
                <i class="fa fa-users text-primary"></i>
              </div>
            </div>
          </div>
          
          <div class="card">
            <div class="flex justify-between items-start">
              <div>
                <h3 class="text-gray-500 font-medium">本月出勤</h3>
                <p class="text-3xl font-bold mt-1">96.8<span class="text-lg font-medium text-gray-500 ml-1">%</span></p>
                <div class="flex items-center mt-3 text-success text-sm">
                  <i class="fa fa-arrow-up mr-1"></i>
                  <span>2.3% (较上月)</span>
                </div>
              </div>
              <div class="h-12 w-12 rounded-full bg-success/10 flex items-center justify-center">
                <i class="fa fa-check-circle-o text-success"></i>
              </div>
            </div>
          </div>
          
          <div class="card">
            <div class="flex justify-between items-start">
              <div>
                <h3 class="text-gray-500 font-medium">平均工时</h3>
                <p class="text-3xl font-bold mt-1">176<span class="text-lg font-medium text-gray-500 ml-1">小时</span></p>
                <div class="flex items-center mt-3 text-danger text-sm">
                  <i class="fa fa-arrow-down mr-1"></i>
                  <span>4小时 (较上月)</span>
                </div>
              </div>
              <div class="h-12 w-12 rounded-full bg-warning/10 flex items-center justify-center">
                <i class="fa fa-clock-o text-warning"></i>
              </div>
            </div>
          </div>
          
          <div class="card">
            <div class="flex justify-between items-start">
              <div>
                <h3 class="text-gray-500 font-medium">迟到次数</h3>
                <p class="text-3xl font-bold mt-1">42<span class="text-lg font-medium text-gray-500 ml-1">次</span></p>
                <div class="flex items-center mt-3 text-danger text-sm">
                  <i class="fa fa-arrow-up mr-1"></i>
                  <span>8次 (较上月)</span>
                </div>
              </div>
              <div class="h-12 w-12 rounded-full bg-danger/10 flex items-center justify-center">
                <i class="fa fa-exclamation-circle-o text-danger"></i>
              </div>
            </div>
          </div>
        </div>

        <!-- 部门筛选和搜索 -->
        <div class="card mb-8">
          <div class="flex flex-col md:flex-row justify-between items-start md:items-center gap-4">
            <div class="flex flex-wrap gap-2">
              <button class="btn btn-primary">全部部门</button>
              <button class="btn btn-outline">技术部</button>
              <button class="btn btn-outline">市场部</button>
              <button class="btn btn-outline">人力资源部</button>
              <button class="btn btn-outline">财务部</button>
              <button class="btn btn-outline">销售部</button>
            </div>
            
            <div class="relative w-full md:w-auto">
              <span class="absolute inset-y-0 left-0 flex items-center pl-3">
                <i class="fa fa-search text-gray-400"></i>
              </span>
              <input type="text" class="form-input pl-10" placeholder="搜索员工姓名或工号...">
            </div>
          </div>
        </div>

        <!-- 员工列表 -->
        <div class="card mb-8">
          <div class="flex justify-between items-center mb-6">
            <h3 class="font-semibold text-lg">员工列表</h3>
            <button class="btn btn-primary">
              <i class="fa fa-plus mr-2"></i>添加员工
            </button>
          </div>
          
          <div class="overflow-x-auto">
            <table class="min-w-full divide-y divide-gray-200">
              <thead>
                <tr>
                  <th class="px-4 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">工号</th>
                  <th class="px-4 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">姓名</th>
                  <th class="px-4 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">部门</th>
                  <th class="px-4 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">职位</th>
                  <th class="px-4 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">入职日期</th>
                  <th class="px-4 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">本月出勤</th>
                  <th class="px-4 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">状态</th>
                  <th class="px-4 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">操作</th>
                </tr>
              </thead>
              <tbody class="bg-white divide-y divide-gray-200">
                <tr>
                  <td class="px-4 py-4 whitespace-nowrap text-sm font-medium text-gray-900">EMP001</td>
                  <td class="px-4 py-4 whitespace-nowrap">
                    <div class="flex items-center">
                      <img class="h-8 w-8 rounded-full" src="https://picsum.photos/id/1005/40/40" alt="员工头像">
                      <div class="ml-3">
                        <div class="text-sm font-medium text-gray-900">张三</div>
                        <div class="text-xs text-gray-500">zhangsan@example.com</div>
                      </div>
                    </div>
                  </td>
                  <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">技术部</td>
                  <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">前端开发工程师</td>
                  <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">2024-03-15</td>
                  <td class="px-4 py-4 whitespace-nowrap">
                    <div class="flex items-center">
                      <div class="w-full bg-gray-200 rounded-full h-2 mr-2">
                        <div class="bg-success h-2 rounded-full" style="width: 92%"></div>
                      </div>
                      <span class="text-sm font-medium text-gray-900">92%</span>
                    </div>
                  </td>
                  <td class="px-4 py-4 whitespace-nowrap">
                    <span class="px-2 py-1 text-xs font-medium bg-success/10 text-success rounded-full">在职</span>
                  </td>
                  <td class="px-4 py-4 whitespace-nowrap text-sm text-primary">
                    <div class="flex space-x-2">
                      <button class="text-primary hover:text-primary/80">
                        <i class="fa fa-eye"></i>
                      </button>
                      <button class="text-warning hover:text-warning/80">
                        <i class="fa fa-pencil"></i>
                      </button>
                      <button class="text-danger hover:text-danger/80">
                        <i class="fa fa-trash"></i>
                      </button>
                    </div>
                  </td>
                </tr>
                <tr>
                  <td class="px-4 py-4 whitespace-nowrap text-sm font-medium text-gray-900">EMP002</td>
                  <td class="px-4 py-4 whitespace-nowrap">
                    <div class="flex items-center">
                      <img class="h-8 w-8 rounded-full" src="https://picsum.photos/id/1000/40/40" alt="员工头像">
                      <div class="ml-3">
                        <div class="text-sm font-medium text-gray-900">李四</div>
                        <div class="text-xs text-gray-500">lisi@example.com</div>
                      </div>
                    </div>
                  </td>
                  <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">技术部</td>
                  <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">后端开发工程师</td>
                  <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">2023-11-20</td>
                  <td class="px-4 py-4 whitespace-nowrap">
                    <div class="flex items-center">
                      <div class="w-full bg-gray-200 rounded-full h-2 mr-2">
                        <div class="bg-success h-2 rounded-full" style="width: 88%"></div>
                      </div>
                      <span class="text-sm font-medium text-gray-900">88%</span>
                    </div>
                  </td>
                  <td class="px-4 py-4 whitespace-nowrap">
                    <span class="px-2 py-1 text-xs font-medium bg-success/10 text-success rounded-full">在职</span>
                  </td>
                  <td class="px-4 py-4 whitespace-nowrap text-sm text-primary">
                    <div class="flex space-x-2">
                      <button class="text-primary hover:text-primary/80">
                        <i class="fa fa-eye"></i>
                      </button>
                      <button class="text-warning hover:text-warning/80">
                        <i class="fa fa-pencil"></i>
                      </button>
                      <button class="text-danger hover:text-danger/80">
                        <i class="fa fa-trash"></i>
                      </button>
                    </div>
                  </td>
                </tr>
                <tr>
                  <td class="px-4 py-4 whitespace-nowrap text-sm font-medium text-gray-900">EMP003</td>
                  <td class="px-4 py-4 whitespace-nowrap">
                    <div class="flex items-center">
                      <img class="h-8 w-8 rounded-full" src="https://picsum.photos/id/1012/40/40" alt="员工头像">
                      <div class="ml-3">
                        <div class="text-sm font-medium text-gray-900">王五</div>
                        <div class="text-xs text-gray-500">wangwu@example.com</div>
                      </div>
                    </div>
                  </td>
                  <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">市场部</td>
                  <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">市场专员</td>
                  <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">2024-01-10</td>
                  <td class="px-4 py-4 whitespace-nowrap">
                    <div class="flex items-center">
                      <div class="w-full bg-gray-200 rounded-full h-2 mr-2">
                        <div class="bg-warning h-2 rounded-full" style="width: 76%"></div>
                      </div>
                      <span class="text-sm font-medium text-gray-900">76%</span>
                    </div>
                  </td>
                  <td class="px-4 py-4 whitespace-nowrap">
                    <span class="px-2 py-1 text-xs font-medium bg-success/10 text-success rounded-full">在职</span>
                  </td>
                  <td class="px-4 py-4 whitespace-nowrap text-sm text-primary">
                    <div class="flex space-x-2">
                      <button class="text-primary hover:text-primary/80">
                        <i class="fa fa-eye"></i>
                      </button>
                      <button class="text-warning hover:text-warning/80">
                        <i class="fa fa-pencil"></i>
                      </button>
                      <button class="text-danger hover:text-danger/80">
                        <i class="fa fa-trash"></i>
                      </button>
                    </div>
                  </td>
                </tr>
                <tr>
                  <td class="px-4 py-4 whitespace-nowrap text-sm font-medium text-gray-900">EMP004</td>
                  <td class="px-4 py-4 whitespace-nowrap">
                    <div class="flex items-center">
                      <img class="h-8 w-8 rounded-full" src="https://picsum.photos/id/1027/40/40" alt="员工头像">
                      <div class="ml-3">
                        <div class="text-sm font-medium text-gray-900">赵六</div>
                        <div class="text-xs text-gray-500">zhaoliu@example.com</div>
                      </div>
                    </div>
                  </td>
                  <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">人力资源部</td>
                  <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">HR经理</td>
                  <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">2022-08-05</td>
                  <td class="px-4 py-4 whitespace-nowrap">
                    <div class="flex items-center">
                      <div class="w-full bg-gray-200 rounded-full h-2 mr-2">
                        <div class="bg-success h-2 rounded-full" style="width: 96%"></div>
                      </div>
                      <span class="text-sm font-medium text-gray-900">96%</span>
                    </div>
                  </td>
                  <td class="px-4 py-4 whitespace-nowrap">
                    <span class="px-2 py-1 text-xs font-medium bg-success/10 text-success rounded-full">在职</span>
                  </td>
                  <td class="px-4 py-4 whitespace-nowrap text-sm text-primary">
                    <div class="flex space-x-2">
                      <button class="text-primary hover:text-primary/80">
                        <i class="fa fa-eye"></i>
                      </button>
                      <button class="text-warning hover:text-warning/80">
                        <i class="fa fa-pencil"></i>
                      </button>
                      <button class="text-danger hover:text-danger/80">
                        <i class="fa fa-trash"></i>
                      </button>
                    </div>
                  </td>
                </tr>
                <tr>
                  <td class="px-4 py-4 whitespace-nowrap text-sm font-medium text-gray-900">EMP005</td>
                  <td class="px-4 py-4 whitespace-nowrap">
                    <div class="flex items-center">
                      <img class="h-8 w-8 rounded-full" src="https://picsum.photos/id/1025/40/40" alt="员工头像">
                      <div class="ml-3">
                        <div class="text-sm font-medium text-gray-900">钱七</div>
                        <div class="text-xs text-gray-500">qianqi@example.com</div>
                      </div>
                    </div>
                  </td>
                  <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">财务部</td>
                  <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">会计</td>
                  <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">2023-05-22</td>
                  <td class="px-4 py-4 whitespace-nowrap">
                    <div class="flex items-center">
                      <div class="w-full bg-gray-200 rounded-full h-2 mr-2">
                        <div class="bg-success h-2 rounded-full" style="width: 94%"></div>
                      </div>
                      <span class="text-sm font-medium text-gray-900">94%</span>
                    </div>
                  </td>
                  <td class="px-4 py-4 whitespace-nowrap">
                    <span class="px-2 py-1 text-xs font-medium bg-warning/10 text-warning rounded-full">休假中</span>
                  </td>
                  <td class="px-4 py-4 whitespace-nowrap text-sm text-primary">
                    <div class="flex space-x-2">
                      <button class="text-primary hover:text-primary/80">
                        <i class="fa fa-eye"></i>
                      </button>
                      <button class="text-warning hover:text-warning/80">
                        <i class="fa fa-pencil"></i>
                      </button>
                      <button class="text-danger hover:text-danger/80">
                        <i class="fa fa-trash"></i>
                      </button>
                    </div>
                  </td>
                </tr>
              </tbody>
            </table>
          </div>
          
          <!-- 分页 -->
          <div class="flex justify-between items-center mt-6">
            <div class="text-sm text-gray-500">
              显示 <span class="font-medium">1</span> 到 <span class="font-medium">5</span> 条，共 <span class="font-medium">128</span> 条
            </div>
            <div class="flex space-x-1">
              <button class="btn btn-outline px-3 py-1">上一页</button>
              <button class="btn btn-primary px-3 py-1">1</button>
              <button class="btn btn-outline px-3 py-1">2</button>
              <button class="btn btn-outline px-3 py-1">3</button>
              <button class="btn btn-outline px-3 py-1">...</button>
              <button class="btn btn-outline px-3 py-1">26</button>
              <button class="btn btn-outline px-3 py-1">下一页</button>
            </div>
          </div>
        </div>

        <!-- 部门员工分布图表 -->
        <div class="card mb-8">
          <div class="flex justify-between items-center mb-6">
            <h3 class="font-semibold text-lg">部门员工分布</h3>
            <div class="flex space-x-2">
              <button class="btn btn-primary text-sm px-3 py-1">饼图</button>
              <button class="btn btn-outline text-sm px-3 py-1">柱状图</button>
            </div>
          </div>
          <div class="h-80">
            <canvas id="departmentChart"></canvas>
          </div>
        </div>

        <!-- 员工考勤统计 -->
        <div class="card">
          <div class="flex justify-between items-center mb-6">
            <h3 class="font-semibold text-lg">员工考勤统计</h3>
            <div class="flex space-x-2">
              <button class="btn btn-outline text-sm px-3 py-1">周</button>
              <button class="btn btn-primary text-sm px-3 py-1">月</button>
              <button class="btn btn-outline text-sm px-3 py-1">年</button>
            </div>
          </div>
          <div class="h-80">
            <canvas id="attendanceStatisticsChart"></canvas>
          </div>
        </div>
      </div>
    </main>
  </div>

  <footer class="bg-white border-t border-gray-200 py-4">
    <div class="container mx-auto px-4">
      <div class="flex flex-col md:flex-row justify-between items-center">
        <div class="text-center md:text-left mb-4 md:mb-0">
          <p class="text-sm text-gray-500">© 2025 考勤系统. 保留所有权利.</p>
        </div>
        <div class="flex space-x-4">
          <a href="#" class="text-gray-500 hover:text-primary">
            <i class="fa fa-question-circle"></i> 帮助中心
          </a>
          <a href="#" class="text-gray-500 hover:text-primary">
            <i class="fa fa-file-text-o"></i> 使用条款
          </a>
          <a href="#" class="text-gray-500 hover:text-primary">
            <i class="fa fa-shield"></i> 隐私政策
          </a>
        </div>
      </div>
    </div>
  </footer>

  <script>
    // 设置当前日期
    const options = { year: 'numeric', month: 'long', day: 'numeric', weekday: 'long' };
    document.getElementById('current-date').textContent = new Date().toLocaleDateString('zh-CN', options);
    
    // 部门员工分布图表
    const departmentCtx = document.getElementById('departmentChart').getContext('2d');
    const departmentChart = new Chart(departmentCtx, {
      type: 'doughnut',
      data: {
        labels: ['技术部', '市场部', '人力资源部', '财务部', '销售部', '行政部'],
        datasets: [{
          data: [42, 23, 15, 12, 28, 8],
          backgroundColor: [
            '#165DFF',
            '#4080FF',
            '#00B42A',
            '#FF7D00',
            '#F53F3F',
            '#86909C'
          ],
          borderWidth: 0,
          hoverOffset: 4
        }]
      },
      options: {
        responsive: true,
        maintainAspectRatio: false,
        plugins: {
          legend: {
            position: 'right',
          },
          tooltip: {
            callbacks: {
              label: function(context) {
                const label = context.label || '';
                const value = context.raw || 0;
                const total = context.dataset.data.reduce((a, b) => a + b, 0);
                const percentage = Math.round((value / total) * 100);
                return `${label}: ${value}人 (${percentage}%)`;
              }
            }
          }
        },
        cutout: '70%',
        animation: {
          animateRotate: true,
          animateScale: true
        }
      }
    });
    
    // 员工考勤统计图表
    const attendanceStatisticsCtx = document.getElementById('attendanceStatisticsChart').getContext('2d');
    const attendanceStatisticsChart = new Chart(attendanceStatisticsCtx, {
      type: 'bar',
      data: {
        labels: ['张三', '李四', '王五', '赵六', '钱七', '孙八', '周九', '吴十'],
        datasets: [
          {
            label: '出勤天数',
            data: [21, 20, 17, 22, 21, 20, 19, 22],
            backgroundColor: '#165DFF',
            borderRadius: 4
          },
          {
            label: '迟到次数',
            data: [1, 2, 4, 0, 1, 2, 3, 0],
            backgroundColor: '#F53F3F',
            borderRadius: 4
          },
          {
            label: '请假天数',
            data: [0, 1, 3, 0, 1, 1, 2, 0],
            backgroundColor: '#FF7D00',
            borderRadius: 4
          }
        ]
      },
      options: {
        responsive: true,
        maintainAspectRatio: false,
        plugins: {
          legend: {
            position: 'top',
          },
          tooltip: {
            mode: 'index',
            intersect: false,
          }
        },
        scales: {
          y: {
            beginAtZero: true,
            grid: {
              drawBorder: false,
              color: 'rgba(0, 0, 0, 0.05)',
            }
          },
          x: {
            grid: {
              display: false
            }
          }
        },
        animation: {
          duration: 1000,
          easing: 'easeOutQuart'
        }
      }
    });
  </script>
</body>
</html>
    